package day6;

import java.io.BufferedReader;
import java.io.*;
import java.io.FileReader;

/**
 * @author oldliu
 * @since 1.0
 */
public class BuffReaderTest {
    public static void main(String[] args) {
        try {
//            BufferedReader br=new BufferedReader(new FileReader("D:\\Documents\\桌面\\wendang.txt"));
            BufferedReader br=new BufferedReader(new InputStreamReader(new FileInputStream("D:\\Documents\\桌面\\wendang.txt"),"gbk"));
            String str=null;
            while((str=br.readLine())!=null){
                System.out.println(str.length()+":"+str);
            }
            br.close();
        } catch (IOException e) {
            e.printStackTrace();
        }

    }
}
